﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace LightGameLibs
{
    [CreateAssetMenu(menuName = "LightGameLibs/LocalDBConfig")]
    public class LocalDBConfig : ScriptableObject
    {
        [SerializeField]
        [HideInInspector]
        private DBTag2TextDict m_tag2TextDict = new DBTag2TextDict();

        public DBTag2TextDict Tag2TextDict { get { return m_tag2TextDict; } }

        void OnEnable()
        {
            foreach (DBTag item in Enum.GetValues(typeof(DBTag)))
            {
                if (!m_tag2TextDict.ContainsKey(item))
                {
                    m_tag2TextDict.Add(item, new DBTextAsset());
                }
            }
        }
    }
}
